/**
 * MeetRoomDaoImpl.java
 */
package com.prs.crm.dao.meeting.impl;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

import org.courser.hibernate.QueryExample;
import org.courser.ui.PaginationSupport;
import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.Order;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.meeting.MeetRoomDao;
import com.prs.crm.domain.meeting.MeetRoom;

/**
 * @author ZhuDongMei
 * @E-mail:1223984339@qq.com
 * @qq:1223984339
 * @version 创建时间：2011-3-16 上午11:12:28 简单说明
 */

public class MeetRoomDaoImpl extends BaseDaoImpl<MeetRoom> implements MeetRoomDao {

	/* (non-Javadoc)
	 * @see com.prs.crm.dao.meeting.MeetRoomDao#getAllMeetRooms()
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<MeetRoom> getAllMeetRooms() {
		return (List<MeetRoom>)this.getHibernateTemplate().execute(new HibernateCallback() {

			@Override
			public Object doInHibernate(Session session)
			throws HibernateException, SQLException {
		// TODO Auto-generated method stub
		Criteria criteria = session.createCriteria(MeetRoom.class);
		criteria.addOrder(Order.asc("id"));
		return criteria.list();
	}

		});
	}

}
